Conversation
- Updated the version to 2.1.2pre - Linked the Github repository in the metadata (for Github packages)
Ensure children become true roots after remove_all! by clearing their parent links. This matches the method's contract and prevents stale parent references from corrupting later traversal or metrics.
Raise when renaming a child to an existing sibling name to prevent overwriting entries in the children hash. This avoids orphaning nodes and keeps child lookup consistent.
Fix set_child_at index errors and clean up parent/hash references when replacing or clearing children. This preserves swap semantics and avoids stale lookups.
Skip nil children during postorder and breadth-first traversals so binary nodes with missing children do not break traversal. Add a regression test covering nil child traversal paths.
Return a level-wise enumerator when no block is given and add a test to assert the yielded level arrays match the tree structure.
Render '<Empty>' when a node has nil content and add tests for both nil and non-nil content values.
Add a new 2.2.0 section covering recent behavior changes in tree operations and traversal, plus link references for the new entries.
Bump the gem version to 2.2.0 and record the 2.2.0 changes in the project history.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release R2.2.0
Summary of changes:
remove_all!detaches children by clearing parent links.rename_childagainst sibling name collisions.set_child_at) with proper index errors and cleanup.each_levelto return a level-wise enumerator when no block is given.to_sto show<Empty>for nil content.Tag: R2.2.0